<!DOCTYPE html>
<html>
<head>
<meta charset="<?php echo $cfg_soft_lang; ?>">
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
<title>提现管理</title>
<link href="../static/web/css/admin2.css" rel="stylesheet" type="text/css">
<script language="javascript" src="js/global.js"></script>
<script language="javascript" src="js/context_menu.js"></script>
<script language="javascript" src="js/ieemu.js"></script>
<script language="javascript" src="js/dialog.js"></script>
<script language="javascript" src="../static/web/js/webajax2.js"></script>
<style>
#time{background:url(./images/calendar.gif) 3px no-repeat;padding-left:23px;}
.calendar{position:absolute;left:-9999px;top:-9999px;}
.shanchu{border:1px solid #CCC;}
.btn{padding:5px;margin:0 5px;border-radius:5px;cursor:pointer;}
.yiwancheng{background-color:#51ACF9;color:#fff;}
.hui{background-color:#CCCCCC;color:#f0f0f0;}
.coolbg:hover{background:#333;color:#fff;}
</style>
</head>
<body background='images/allbg.gif' leftmargin='8' topmargin='8'>
<table width="98%" border="0" cellpadding="1" cellspacing="1" align="center" class="tbtitle" style="background:#cfcfcf;margin-top:20px;">
<tr bgcolor="#CFCFCF"> 
<td height="44" colspan="20" bgcolor="#f5f5f5" style="padding:0 15px;">
<b>用户提现管理</b>
<a href="?zt=2" class="coolbg" style="float:right;margin-left:15px;line-height:32px;padding:0 15px;border-radius:16px;">已完成</a>
<a href="?zt=1" class="coolbg" style="float:right;margin-left:15px;line-height:32px;padding:0 15px;border-radius:16px;">待处理</a>
</td>
</tr>
    <tr bgcolor="#FBFCE2">
	<td align="center">选择</td>
    <td align="center">编号</td>
    <td align="center">订单号</td>
    <td align="center">金额</td>
    <td align="center">昵称</td>
    <td align="center">支付宝姓名</td>
    <td align="center">支付宝账号</td>
    <td align="center">提交时间</td>
    <td align="center">状态</td>
    </tr>
    <form name="form1">
    {dede:datalist}
    <tr aid="{dede:field.id/}" bgcolor="#FFFFFF" height="44" align="center" onMouseMove="javascript:this.bgColor='#FCFDEE';" onMouseOut="javascript:this.bgColor='#FFFFFF';">
	<td align="center"><input type='checkbox' name='aids' id='aids' value='{dede:field.id/}' class='np'></td>
    <td align="center">{dede:field.id/}</td>
    <td align="center">{dede:field.ddh/}</td>
    <td align="center">{dede:field.jine/}</td>
    <td align="center">{dede:field.uname/}</td>
    <td align="center">{dede:field.name/}</td>
    <td align="center">{dede:field.alipay/}</td>
    <td align="center">{dede:field.time function="date('Y-m-d H:i',@me)"/}</td>
    <td align="center" class="zt">
    <?php
    if($fields['zt'] == 1){
    	echo '待处理';
    }else {
    	echo '<b color="green">已完成</b>';
    } 
	if($fields['ifcheck'] == 1 && $fields['zt'] == 1){
       echo '&nbsp; x ';
       }
     ?>
   </td>
</tr>  
{/dede:datalist}
</form>

<tr>
<td height="44" colspan="11" bgcolor="#ffffff" style="padding:0 15px;">
<a href="javascript:selAll()" class="coolbg" style="margin-right:10px;line-height:32px;padding:0 15px;border-radius:16px;display:inline-block;">全选</a>
<a href="javascript:noSelAll()" class="coolbg" style="margin-right:10px;line-height:32px;padding:0 15px;border-radius:16px;display:inline-block;">取消</a>
<a href="javascript:excel(0)" class="coolbg" style="margin-right:10px;line-height:32px;padding:0 15px;border-radius:16px;display:none;">导出</a>
<a href="javascript:selok(0)" class="coolbg" style="float:right;line-height:32px;padding:0 15px;border-radius:16px;">设置已完成</a>
</td>
</tr>

<script>
//已完成
$(".yiwancheng").click(function(){
	var aidV = $(this).parents("tr").attr("aid");
	var t = $(this);
	$.post("jjtixian.php",{a:"yiwancheng",aid:aidV},function(result){
		$(t).parents("tr").find(".zt").html('<b color="green">已完成</b>');
	});
})
//已删除
$(".shanchu").click(function(){
	var aidV = $(this).parents("tr").attr("aid");
	var t = $(this);
	$.post("jjtixian.php",{a:"shanchu",aid:aidV},function(result){
		$(t).parents("tr").find(".zt").html('<b color="red">已删除</b>');
		$(t).parents("tr").addClass("hui");
		$(t).parents("tr").find(".yiwancheng").remove();
	});
})
function selok(aids) {
    var qstr = getCheckboxItem();
    if (aids == 0) aids = getOneItem();
    location = "member_do.php?id=" + qstr + "&dopost=selok"
}
function excel(aids) {
	var qstr = getCheckboxItem();
	if (aids == 0) aids = getOneItem();
	location = "member_do.php?id=" + qstr + "&dopost=excel"
}
function getCheckboxItem() {
	var allSel = "";
	if (document.form1.aids.value) return document.form1.aids.value;
	for (i = 0; i < document.form1.aids.length; i++) {
		if (document.form1.aids[i].checked) {
			if (allSel == "") allSel = document.form1.aids[i].value;
			else allSel = allSel + "`" + document.form1.aids[i].value
		}
	}
	return allSel
}
function getOneItem() {
	var allSel = "";
	if (document.form1.aids.value) return document.form1.aids.value;
	for (i = 0; i < document.form1.aids.length; i++) {
		if (document.form1.aids[i].checked) {
			allSel = document.form1.aids[i].value;
			break
		}
	}
	return allSel
}
function selAll() {
	for (i = 0; i < document.form1.aids.length; i++) {
		if (!document.form1.aids[i].checked) {
			document.form1.aids[i].checked = true
		}
	}
}
function noSelAll() {
	for (i = 0; i < document.form1.aids.length; i++) {
		if (document.form1.aids[i].checked) {
			document.form1.aids[i].checked = false
		}
	}
}
</script>
<tr>
<td height="36" colspan="20" bgcolor="#ffffff" align="center">
{dede:pagelist listitem="info,index,end,pre,next,pageno" listsize="5"/}
</td>
</tr>
</table>
</body>
</html>